package com.ebay.model;
import com.ebay.util.DBconn;
import com.opensymphony.xwork2.ActionSupport;
import java.util.*;
import java.sql.*;

public class homemodel {
	
	private List cat_list;
	private List subcat_list;
	DBconn db;
	Connection con;
	String query;
	ResultSet rs;
	Statement st;
	
	
	
	
	
	public List getCat_list() {
		db=new DBconn();
		cat_list=new ArrayList();
		try{
			con=db.getConnection();
			st=con.createStatement();
			query="select * from category";
			rs=st.executeQuery(query);
			while(rs.next()){
				System.out.println("shekhar"+rs.getString("category_name"));
				cat_list.add(rs.getString("category_name"));
			}
		}catch(Exception e){
			
		}
		return cat_list;
	}
	public void setCat_list(List cat_list) {
		this.cat_list = cat_list;
	}
	public List getSubcat_list() {
		return subcat_list;
	}
	public void setSubcat_list(List subcat_list) {
		this.subcat_list = subcat_list;
	}
	

}
